3.176 \(\int \frac{a+b \log (c x^n)}{(d+e \log (c x^n))^2} \, dx\)

Optimal. Leaf size=89 \[ \frac{x \left (c x^n\right )^{-1/n} e^{-\frac{d}{e n}} (a e-b d+b e n) \text{Ei}\left (\frac{d+e \log \left (c x^n\right )}{e n}\right )}{e^3 n^2}+\frac{x (b d-a e)}{e^2 n \left (e \log \left (c x^n\right )+d\right )} \]

[Out]

((-(b*d) + a*e + b*e*n)*x*ExpIntegralEi[(d + e*Log[c*x^n])/(e*n)])/(e^3*E^(d/(e*n))*n^2*(c*x^n)^n^(-1)) + ((b*
d - a*e)*x)/(e^2*n*(d + e*Log[c*x^n]))

________________________________________________________________________________________

Rubi [A]  time = 0.138486, antiderivative size = 135, normalized size of antiderivative = 1.52, number of steps used = 7, number of rules used = 4, integrand size = 23, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.174, Rules used = {2360, 2297, 2300, 2178} \[ -\frac{x \left (c x^n\right )^{-1/n} e^{-\frac{d}{e n}} (b d-a e) \text{Ei}\left (\frac{d+e \log \left (c x^n\right )}{e n}\right )}{e^3 n^2}+\frac{x (b d-a e)}{e^2 n \left (e \log \left (c x^n\right )+d\right )}+\frac{b x \left (c x^n\right )^{-1/n} e^{-\frac{d}{e n}} \text{Ei}\left (\frac{d+e \log \left (c x^n\right )}{e n}\right )}{e^2 n} \]

Antiderivative was successfully verified.

[In]

Int[(a + b*Log[c*x^n])/(d + e*Log[c*x^n])^2,x]

[Out]

-(((b*d - a*e)*x*ExpIntegralEi[(d + e*Log[c*x^n])/(e*n)])/(e^3*E^(d/(e*n))*n^2*(c*x^n)^n^(-1))) + (b*x*ExpInte
gralEi[(d + e*Log[c*x^n])/(e*n)])/(e^2*E^(d/(e*n))*n*(c*x^n)^n^(-1)) + ((b*d - a*e)*x)/(e^2*n*(d + e*Log[c*x^n
]))

Rule 2360

Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))^(p_.)*(Log[(c_.)*(x_)^(n_.)]*(e_.) + (d_))^(q_.), x_Symbol] :> Int[E
xpandIntegrand[(a + b*Log[c*x^n])^p*(d + e*Log[c*x^n])^q, x], x] /; FreeQ[{a, b, c, d, e, n}, x] && IntegerQ[p
] && IntegerQ[q]

Rule 2297

Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))^(p_), x_Symbol] :> Simp[(x*(a + b*Log[c*x^n])^(p + 1))/(b*n*(p + 1))
, x] - Dist[1/(b*n*(p + 1)), Int[(a + b*Log[c*x^n])^(p + 1), x], x] /; FreeQ[{a, b, c, n}, x] && LtQ[p, -1] &&
 IntegerQ[2*p]

Rule 2300

Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))^(p_), x_Symbol] :> Dist[x/(n*(c*x^n)^(1/n)), Subst[Int[E^(x/n)*(a +
b*x)^p, x], x, Log[c*x^n]], x] /; FreeQ[{a, b, c, n, p}, x]

Rule 2178

Int[(F_)^((g_.)*((e_.) + (f_.)*(x_)))/((c_.) + (d_.)*(x_)), x_Symbol] :> Simp[(F^(g*(e - (c*f)/d))*ExpIntegral
Ei[(f*g*(c + d*x)*Log[F])/d])/d, x] /; FreeQ[{F, c, d, e, f, g}, x] &&  !$UseGamma === True

Rubi steps

\begin{align*} \int \frac{a+b \log \left (c x^n\right )}{\left (d+e \log \left (c x^n\right )\right )^2} \, dx &=\int \left (\frac{-b d+a e}{e \left (d+e \log \left (c x^n\right )\right )^2}+\frac{b}{e \left (d+e \log \left (c x^n\right )\right )}\right ) \, dx\\ &=\frac{b \int \frac{1}{d+e \log \left (c x^n\right )} \, dx}{e}+\frac{(-b d+a e) \int \frac{1}{\left (d+e \log \left (c x^n\right )\right )^2} \, dx}{e}\\ &=\frac{(b d-a e) x}{e^2 n \left (d+e \log \left (c x^n\right )\right )}-\frac{(b d-a e) \int \frac{1}{d+e \log \left (c x^n\right )} \, dx}{e^2 n}+\frac{\left (b x \left (c x^n\right )^{-1/n}\right ) \operatorname{Subst}\left (\int \frac{e^{\frac{x}{n}}}{d+e x} \, dx,x,\log \left (c x^n\right )\right )}{e n}\\ &=\frac{b e^{-\frac{d}{e n}} x \left (c x^n\right )^{-1/n} \text{Ei}\left (\frac{d+e \log \left (c x^n\right )}{e n}\right )}{e^2 n}+\frac{(b d-a e) x}{e^2 n \left (d+e \log \left (c x^n\right )\right )}-\frac{\left ((b d-a e) x \left (c x^n\right )^{-1/n}\right ) \operatorname{Subst}\left (\int \frac{e^{\frac{x}{n}}}{d+e x} \, dx,x,\log \left (c x^n\right )\right )}{e^2 n^2}\\ &=-\frac{(b d-a e) e^{-\frac{d}{e n}} x \left (c x^n\right )^{-1/n} \text{Ei}\left (\frac{d+e \log \left (c x^n\right )}{e n}\right )}{e^3 n^2}+\frac{b e^{-\frac{d}{e n}} x \left (c x^n\right )^{-1/n} \text{Ei}\left (\frac{d+e \log \left (c x^n\right )}{e n}\right )}{e^2 n}+\frac{(b d-a e) x}{e^2 n \left (d+e \log \left (c x^n\right )\right )}\\ \end{align*}

Mathematica [A]  time = 0.143503, size = 87, normalized size = 0.98 \[ \frac{x \left (c x^n\right )^{-1/n} e^{-\frac{d}{e n}} (a e-b d+b e n) \text{Ei}\left (\frac{d+e \log \left (c x^n\right )}{e n}\right )-\frac{e n x (a e-b d)}{e \log \left (c x^n\right )+d}}{e^3 n^2} \]

Antiderivative was successfully verified.

[In]

Integrate[(a + b*Log[c*x^n])/(d + e*Log[c*x^n])^2,x]

[Out]

(((-(b*d) + a*e + b*e*n)*x*ExpIntegralEi[(d + e*Log[c*x^n])/(e*n)])/(E^(d/(e*n))*(c*x^n)^n^(-1)) - (e*(-(b*d)
+ a*e)*n*x)/(d + e*Log[c*x^n]))/(e^3*n^2)

________________________________________________________________________________________

Maple [C]  time = 0.115, size = 371, normalized size = 4.2 \begin{align*} -2\,{\frac{x \left ( ae-bd \right ) }{{e}^{2}n \left ( 2\,d+2\,e\ln \left ( c \right ) +2\,e\ln \left ({x}^{n} \right ) -ie\pi \,{\it csgn} \left ( ic \right ){\it csgn} \left ( i{x}^{n} \right ){\it csgn} \left ( ic{x}^{n} \right ) +ie\pi \,{\it csgn} \left ( ic \right ) \left ({\it csgn} \left ( ic{x}^{n} \right ) \right ) ^{2}+ie\pi \,{\it csgn} \left ( i{x}^{n} \right ) \left ({\it csgn} \left ( ic{x}^{n} \right ) \right ) ^{2}-ie\pi \, \left ({\it csgn} \left ( ic{x}^{n} \right ) \right ) ^{3} \right ) }}-{\frac{ben+ae-bd}{{e}^{3}{n}^{2}}{{\rm e}^{{\frac{ie\pi \,{\it csgn} \left ( ic \right ){\it csgn} \left ( i{x}^{n} \right ){\it csgn} \left ( ic{x}^{n} \right ) -ie\pi \,{\it csgn} \left ( ic \right ) \left ({\it csgn} \left ( ic{x}^{n} \right ) \right ) ^{2}-ie\pi \,{\it csgn} \left ( i{x}^{n} \right ) \left ({\it csgn} \left ( ic{x}^{n} \right ) \right ) ^{2}+ie\pi \, \left ({\it csgn} \left ( ic{x}^{n} \right ) \right ) ^{3}+2\,\ln \left ( x \right ) en-2\,e\ln \left ( c \right ) -2\,e\ln \left ({x}^{n} \right ) -2\,d}{2\,en}}}}{\it Ei} \left ( 1,-\ln \left ( x \right ) -{\frac{-ie\pi \,{\it csgn} \left ( ic \right ){\it csgn} \left ( i{x}^{n} \right ){\it csgn} \left ( ic{x}^{n} \right ) +ie\pi \,{\it csgn} \left ( ic \right ) \left ({\it csgn} \left ( ic{x}^{n} \right ) \right ) ^{2}+ie\pi \,{\it csgn} \left ( i{x}^{n} \right ) \left ({\it csgn} \left ( ic{x}^{n} \right ) \right ) ^{2}-ie\pi \, \left ({\it csgn} \left ( ic{x}^{n} \right ) \right ) ^{3}+2\,e\ln \left ( c \right ) +2\,e \left ( \ln \left ({x}^{n} \right ) -n\ln \left ( x \right ) \right ) +2\,d}{2\,en}} \right ) } \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((a+b*ln(c*x^n))/(d+e*ln(c*x^n))^2,x)

[Out]

-2/e^2/n*x*(a*e-b*d)/(2*d+2*e*ln(c)+2*e*ln(x^n)-I*e*Pi*csgn(I*c)*csgn(I*x^n)*csgn(I*c*x^n)+I*e*Pi*csgn(I*c)*cs
gn(I*c*x^n)^2+I*e*Pi*csgn(I*x^n)*csgn(I*c*x^n)^2-I*e*Pi*csgn(I*c*x^n)^3)-(b*e*n+a*e-b*d)/e^3/n^2*exp(1/2*(I*e*
Pi*csgn(I*c)*csgn(I*x^n)*csgn(I*c*x^n)-I*e*Pi*csgn(I*c)*csgn(I*c*x^n)^2-I*e*Pi*csgn(I*x^n)*csgn(I*c*x^n)^2+I*e
*Pi*csgn(I*c*x^n)^3+2*ln(x)*e*n-2*e*ln(c)-2*e*ln(x^n)-2*d)/e/n)*Ei(1,-ln(x)-1/2*(-I*e*Pi*csgn(I*c)*csgn(I*x^n)
*csgn(I*c*x^n)+I*e*Pi*csgn(I*c)*csgn(I*c*x^n)^2+I*e*Pi*csgn(I*x^n)*csgn(I*c*x^n)^2-I*e*Pi*csgn(I*c*x^n)^3+2*e*
ln(c)+2*e*(ln(x^n)-n*ln(x))+2*d)/e/n)

________________________________________________________________________________________

Maxima [F]  time = 0., size = 0, normalized size = 0. \begin{align*}{\left ({\left (e n - d\right )} b + a e\right )} \int \frac{1}{e^{3} n \log \left (c\right ) + e^{3} n \log \left (x^{n}\right ) + d e^{2} n}\,{d x} + \frac{{\left (b d - a e\right )} x}{e^{3} n \log \left (c\right ) + e^{3} n \log \left (x^{n}\right ) + d e^{2} n} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*log(c*x^n))/(d+e*log(c*x^n))^2,x, algorithm="maxima")

[Out]

((e*n - d)*b + a*e)*integrate(1/(e^3*n*log(c) + e^3*n*log(x^n) + d*e^2*n), x) + (b*d - a*e)*x/(e^3*n*log(c) +
e^3*n*log(x^n) + d*e^2*n)

________________________________________________________________________________________

Fricas [A]  time = 0.848351, size = 358, normalized size = 4.02 \begin{align*} \frac{{\left ({\left (b d e - a e^{2}\right )} n x e^{\left (\frac{e \log \left (c\right ) + d}{e n}\right )} +{\left (b d e n - b d^{2} + a d e +{\left (b e^{2} n - b d e + a e^{2}\right )} \log \left (c\right ) +{\left (b e^{2} n^{2} -{\left (b d e - a e^{2}\right )} n\right )} \log \left (x\right )\right )} \logintegral \left (x e^{\left (\frac{e \log \left (c\right ) + d}{e n}\right )}\right )\right )} e^{\left (-\frac{e \log \left (c\right ) + d}{e n}\right )}}{e^{4} n^{3} \log \left (x\right ) + e^{4} n^{2} \log \left (c\right ) + d e^{3} n^{2}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*log(c*x^n))/(d+e*log(c*x^n))^2,x, algorithm="fricas")

[Out]

((b*d*e - a*e^2)*n*x*e^((e*log(c) + d)/(e*n)) + (b*d*e*n - b*d^2 + a*d*e + (b*e^2*n - b*d*e + a*e^2)*log(c) +
(b*e^2*n^2 - (b*d*e - a*e^2)*n)*log(x))*log_integral(x*e^((e*log(c) + d)/(e*n))))*e^(-(e*log(c) + d)/(e*n))/(e
^4*n^3*log(x) + e^4*n^2*log(c) + d*e^3*n^2)

________________________________________________________________________________________

Sympy [F]  time = 0., size = 0, normalized size = 0. \begin{align*} \int \frac{a + b \log{\left (c x^{n} \right )}}{\left (d + e \log{\left (c x^{n} \right )}\right )^{2}}\, dx \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*ln(c*x**n))/(d+e*ln(c*x**n))**2,x)

[Out]

Integral((a + b*log(c*x**n))/(d + e*log(c*x**n))**2, x)

________________________________________________________________________________________

Giac [B]  time = 1.47268, size = 892, normalized size = 10.02 \begin{align*} \text{result too large to display} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*log(c*x^n))/(d+e*log(c*x^n))^2,x, algorithm="giac")

[Out]

b*d*n*x*e/(n^3*e^4*log(x) + d*n^2*e^3 + n^2*e^4*log(c)) + b*n^2*Ei(d*e^(-1)/n + log(c)/n + log(x))*e^(-d*e^(-1
)/n + 2)*log(x)/((n^3*e^4*log(x) + d*n^2*e^3 + n^2*e^4*log(c))*c^(1/n)) - b*d*n*Ei(d*e^(-1)/n + log(c)/n + log
(x))*e^(-d*e^(-1)/n + 1)*log(x)/((n^3*e^4*log(x) + d*n^2*e^3 + n^2*e^4*log(c))*c^(1/n)) - a*n*x*e^2/(n^3*e^4*l
og(x) + d*n^2*e^3 + n^2*e^4*log(c)) + b*d*n*Ei(d*e^(-1)/n + log(c)/n + log(x))*e^(-d*e^(-1)/n + 1)/((n^3*e^4*l
og(x) + d*n^2*e^3 + n^2*e^4*log(c))*c^(1/n)) - b*d^2*Ei(d*e^(-1)/n + log(c)/n + log(x))*e^(-d*e^(-1)/n)/((n^3*
e^4*log(x) + d*n^2*e^3 + n^2*e^4*log(c))*c^(1/n)) + b*n*Ei(d*e^(-1)/n + log(c)/n + log(x))*e^(-d*e^(-1)/n + 2)
*log(c)/((n^3*e^4*log(x) + d*n^2*e^3 + n^2*e^4*log(c))*c^(1/n)) - b*d*Ei(d*e^(-1)/n + log(c)/n + log(x))*e^(-d
*e^(-1)/n + 1)*log(c)/((n^3*e^4*log(x) + d*n^2*e^3 + n^2*e^4*log(c))*c^(1/n)) + a*n*Ei(d*e^(-1)/n + log(c)/n +
 log(x))*e^(-d*e^(-1)/n + 2)*log(x)/((n^3*e^4*log(x) + d*n^2*e^3 + n^2*e^4*log(c))*c^(1/n)) + a*d*Ei(d*e^(-1)/
n + log(c)/n + log(x))*e^(-d*e^(-1)/n + 1)/((n^3*e^4*log(x) + d*n^2*e^3 + n^2*e^4*log(c))*c^(1/n)) + a*Ei(d*e^
(-1)/n + log(c)/n + log(x))*e^(-d*e^(-1)/n + 2)*log(c)/((n^3*e^4*log(x) + d*n^2*e^3 + n^2*e^4*log(c))*c^(1/n))